package com.mikey.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author :Mikey
 * @description :
 * @create :2022-08-29 21:31:00
 */
@Configuration
public class ConfigBean {
    @Bean
    @LoadBalanced//开启负载均衡
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
//    @Bean
//    public IRule myIRule(){
//        return new RandomRule();
//    }
}
